{% extends 'base.html' %}
{% block title %}  - Send email{% endblock %}
{% block js %}
<script type="text/javascript" src="/site_media/js/jquery-1.5.2.min.js"></script>
<script type="text/javascript" src="/site_media/js/jquery.wysiwyg.js"></script>
<link rel="stylesheet" href="/site_media/css/jquery.wysiwyg.css" type="text/css" />
<script type="text/javascript">
	$(function()
	{
		$('#wysiwyg').wysiwyg();
	});
</script>
{% endblock %}
{% block content %}
<script>
	function check_email(e_form){

		return true;
	}
</script>
<div id="content" style="position:absolute; top:20px; left:0px; width:610px; background-color: #1A1A1A; layer-background-color: #1A1A1A;">

	<table width="610">
    <form method="post" action="" onsubmit="return check_email(this);">
<tr>
	  <td colspan="2"><p><span style="font-size:14px;color:#CCC">Send statistic e-mails</span></p></td>
</tr>
		<tr>
			<td width="30">To:</td>
			<td> <input size="35" type="text" name="to_address" readonly value="{{x.es.user.email}}"/></td>
		</tr>
		<tr>
			<td>cc:</td>
			<td><input size="35" type="text" name="cc_address" value="database@uncle-berlin.de"/></td>
		</tr>
		<tr>
			<td colspan="2">
				<textarea id="wysiwyg" name="email_content" cols="80" rows="12">
Dear {{x.es.user.first_name}} {{x.es.user.last_name}},<br></br>

It has been 3 month since we last contacted you. During this period, you have had <b>{{ last_visits }} visits</b> and you have been added to <b>{{last_uncle}} projects</b>.<br></br>

You have a total amount of <b>{{x.es.visits}} visits</b> and and you have totally been added to <b>{{x.es.project_counts}} projects</b>.
<br></br><br></br>
Best regards,<br></br>
Uncle

				</textarea>
			</td>
		</tr>
        
		<tr>          
            <td colspan="2"align="right"><input type="submit" value="Send"/></td>
		</tr>
        </form>  
        <tr><td colspan="2"align="left"><FORM><INPUT TYPE="button" VALUE="Back" onClick="history.go(-1);return true;"></FORM></td></tr>
	</table>

</div>

{% endblock %}
